unit UTestPricing;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.ExtCtrls, AdvPanel,
  DBAdvGlowNavigator, cxGraphics, cxControls, cxLookAndFeels,
  cxLookAndFeelPainters, cxStyles, dxSkinsCore, dxSkinBlack, dxSkinBlue,
  dxSkinBlueprint, dxSkinCaramel, dxSkinCoffee, dxSkinDarkRoom, dxSkinDarkSide,
  dxSkinDevExpressDarkStyle, dxSkinDevExpressStyle, dxSkinFoggy,
  dxSkinGlassOceans, dxSkinHighContrast, dxSkiniMaginary, dxSkinLilian,
  dxSkinLiquidSky, dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMoneyTwins,
  dxSkinOffice2007Black, dxSkinOffice2007Blue, dxSkinOffice2007Green,
  dxSkinOffice2007Pink, dxSkinOffice2007Silver, dxSkinOffice2010Black,
  dxSkinOffice2010Blue, dxSkinOffice2010Silver, dxSkinPumpkin, dxSkinSeven,
  dxSkinSevenClassic, dxSkinSharp, dxSkinSharpPlus, dxSkinSilver,
  dxSkinSpringTime, dxSkinStardust, dxSkinSummer2008, dxSkinTheAsphaltWorld,
  dxSkinsDefaultPainters, dxSkinValentine, dxSkinVS2010, dxSkinWhiteprint,
  dxSkinXmas2008Blue, dxSkinscxPCPainter, cxCustomData, cxFilter, cxData,
  cxDataStorage, cxEdit, cxNavigator, Data.DB, cxDBData, cxGridLevel, cxClasses,
  cxGridCustomView, cxGridCustomTableView, cxGridTableView, cxGridDBTableView,
  cxGrid, UDMLab, cxContainer, cxGroupBox, cxTextEdit, cxMaskEdit,
  cxDropDownEdit, cxLookupEdit, cxDBLookupEdit, cxDBLookupComboBox, Vcl.StdCtrls, UDMPerson, UDMItems;

type
  TFTestPricing = class(TForm)
    AdvPanel1: TAdvPanel;
    AdvPanelStyler1: TAdvPanelStyler;
    DBAdvGlowNavigator1: TDBAdvGlowNavigator;
    cxGrid1DBTableView1: TcxGridDBTableView;
    cxGrid1Level1: TcxGridLevel;
    cxGrid1: TcxGrid;
    cxGroupBox1: TcxGroupBox;
    AdvPanel2: TAdvPanel;
    Label1: TLabel;
    cxGrid1DBTableView1batch_nr: TcxGridDBColumn;
    cxGrid1DBTableView1ItemCode: TcxGridDBColumn;
    cxGrid1DBTableView1coef_value: TcxGridDBColumn;
    cxGrid1DBTableView1coef_label: TcxGridDBColumn;
    cxGrid1DBTableView1insurance_id: TcxGridDBColumn;
    cxGrid1DBTableView1currency_id: TcxGridDBColumn;
    cxGrid1DBTableView1CoefPrice: TcxGridDBColumn;
    cxGrid1DBTableView1TotalPrice: TcxGridDBColumn;
    cxLookupComboBox1: TcxLookupComboBox;
    procedure FormCreate(Sender: TObject);
    procedure cxLookupComboBox1PropertiesEditValueChanged(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  FTestPricing: TFTestPricing;

implementation

{$R *.dfm}

procedure TFTestPricing.cxLookupComboBox1PropertiesEditValueChanged(
  Sender: TObject);
begin
  DMItems.combine_tpa_class.Execute;
  DMItems.his_tpa_class_combine_for_pricing.Refresh;

  DMLab.his_enctounter_lab_tests_prices.Active := False;
  DMLab.his_enctounter_lab_tests_prices.ParamByName('a').Value := Self.cxLookupComboBox1.EditValue;
  DMLab.his_enctounter_lab_tests_prices.Active := True;



end;

procedure TFTestPricing.FormCreate(Sender: TObject);
begin
  DMLab.his_enctounter_lab_tests_prices.Active := false;
end;

end.
